<%-- 
    Document   : rollregister
    Created on : 2019-7-11, 16:35:34
    Author     : dusin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

   <head lang="en"> 
        <meta charset="UTF-8"> 
        <title>上传注册</title> 
        <link rel="stylesheet" type="text/css" href="../../js/jquery/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../js/jquery/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../../css/demo.css">        
         <script type="text/javascript" src="../../js/jquery/jquery-3.3.1.js"></script>
         <script type="text/javascript" src="../../js/jquery/jquery.easyui.min.js"></script>
        <script>
        $(function () {
            $("#upload").click(function () {
                $("#imgWait").show();
                
                $.ajaxFileUpload({
                    url: "../../util/UploadExcelFile",
                    secureuri:false,
                    fileElementId:'file1',
                    dataType:'json',                    
                    success: function (data) {
                        if (data[0].status == true) { //目前只传一个文件
                            alert("上传成功！");                            
                        }else {
                            alert(data[0].msg);
                        }
                        $("#imgWait").hide();
                    },
                    error: function () {
                        alert("上传失败！");
                        $("#imgWait").hide();
                    }
                });
            });
        });
    </script>
    </head> 
    <body>
           
        
	<div style="margin:20px 0;"></div>
	<div class="easyui-panel" title="上传平时成绩记录表注册" style="width:600px;padding:30px 70px 50px 70px">
		
		<div style="margin-bottom:20px">
			<div>文件:</div>
			<input class="easyui-filebox" name="file1" id="file1"
                               data-options="prompt:'选中文件...',buttonText:'选择文件', accept:'application/vnd.ms-excel'" 
                               style="width:100%">
		</div>
            <img src="../../img/gif/wait.gif"  width="150" height="150"
                  style="display:none;margin:0px,0px,0px,20px" />
		<div>
			<a href="#" id="upload" class="easyui-linkbutton" style="width:100%">上传</a>
		</div>
	</div>
    </body>
</html>
